<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 具名函数
        function fun1 (num) {
            console.log('具名函数'+num)
        }
        fun1(10)

        // 匿名函数（鸿蒙中不允许这么写）
        let fun2 = function(num) {
            console.log('匿名函数'+num)
        }
        fun2(20)
    </script>
</body>
</html>